import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)
const state = {
  userName: '',
  USER_INFO: {},
  attention: ''
}
const getters = {
  identity: state => {
    return state.USER_INFO.identity === 2 ? '医生' : '员工'
  }
}
const actions = {
}
const mutations = {
  setUserInfo (state, info) {
    state.USER_INFO = info
  },
  setAttention (state, info) {
    state.attention = info
  }
}
export default new Vuex.Store({
  state,
  getters,
  actions,
  mutations
})
